package org.wj.problem;

public class IsPalindromeNum {

	public static void main(String[] args) {
		System.out.println(isPalindrome(121));
	}

	public static boolean isPalindrome(int x) {
		if (x < 0) {
			return false;
		}
		StringBuilder num = new StringBuilder(String.valueOf(x));
		StringBuilder reverseNum = new StringBuilder(String.valueOf(x)).reverse();
		return num.toString().equals(reverseNum.toString());
	}

}
